//
//  XMLRegionalShow.h
//  ppkc2016
//
//  Created by 拼凑的断音 on 16/5/25.
//  Copyright © 2016年 拼凑的断音. All rights reserved.
//

#import "NormalReturnModel.h"
#import <UIKit/UIKit.h>

@class XMLRegionalShow;
@protocol XMLRegionalShowDelegate <NSObject>
@optional


/**
 *  原图下载过程中调用
 *
 *  @param model       model
 *  @param receiveSize 已接收数据大小
 *  @param totalSize   总数据大小
 *  @param image       下载好的图片，若没下载好，则为nil
 *  @param isFinish    是否完成
 */
- (void)XMLRegionalShow:(XMLRegionalShow *)model didReceiveSize:(long long)receiveSize totalSize:(long long)totalSize image:(UIImage *)image isFinish:(BOOL)isFinish;

@end

@interface XMLRegionalShow : NormalReturnModel

@property (nonatomic,assign) BOOL isDownload;

@property (nonatomic,assign) BOOL isOrigin;

@property (nonatomic,copy) NSString *imgTitle; /**< 图片的标题（用于navigationTitle展示）*/

@property (nonatomic,copy) NSString *imgUrl; /**< 图片的url*/

/**
 *  委托
 */
@property (nonatomic,weak) id<XMLRegionalShowDelegate> delegate;

/**
 *  标记下载百分比
 */
@property (nonatomic,assign) CGFloat process;

/**
 *  开始下载图片
 */
- (void)beginDownload;

+(void)requestRegionalUseDataWithCompletion:(void(^)(BOOL is,NSMutableArray<XMLRegionalShow* > * data))block;

@end
